package com.example.demo.mapper;

import com.example.demo.model.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

@Mapper
public interface UserInfoMapper {

    @Select("select * from  t_user where `uid` = #{id}")
    UserInfo queryUserInfoByName(String id);

    @Insert("insert into t_user(uid, uname, upassword, usex, uemail)"+
            "values (#{uId},#{uName},#{uPassword},#{uSex},#{uEmail})")
     Integer register(UserInfo userInfo);
}
